home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19970929-19971216
/
000117_news@newsmaster….columbia.edu _Thu Oct 16 10:27:31 1997.msg
< prev
next >
Wrap
Internet Message Format
|
1997-12-15
|
2KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA02336
for <kermit.misc@watsun.cc.columbia.edu>; Thu, 16 Oct 1997 10:27:30 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id KAA17288
for kermit.misc@watsun; Thu, 16 Oct 1997 10:27:29 -0400 (EDT)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Take Script parameter's??
Date: 16 Oct 1997 14:27:28 GMT
Organization: Columbia University
Lines: 41
Message-ID: <62588g$5i$1@apakabar.cc.columbia.edu>
References: <623oj3$lrl$1@goanna.cs.rmit.edu.au>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:7896
In article <623oj3$lrl$1@goanna.cs.rmit.edu.au>,
Ross Irvine <rwi@yallara.cs.rmit.edu.au> wrote:
: I would like to be able to give me scripts command line
: arguments, but it doesn't like it. It always says that the extra
: characters (the argument) are ignored.
:
: How can I pass command line args to scripts???
:
: Eg
:
: Kermit> take dothis.ksc {Some text Message}
:
define xx take dothis.ksc
xx {Some text Message}
This sets the macro parameters \%1, \%2, etc, and they will be
visible to the command file (change "xx" to whatever you want
to call the macro).
A more general method does not hardwire the filename, but instead
takes it as the first parameter, and then shifts the others over
(using syntax supported by K95, C-Kermit 6.0, and MS-DOS Kermit 3.15):
define xx {
local filename
asg filename \%1
asg \%1 \%2
asg \%2 \%3
asg \%3 \%4
asg \%4 \%5
asg \%5 \%6
asg \%6 \%7
asg \%7 \%8
asg \%8 \%9
undef \%9
tak \m(filename)
end \v(status)
}
xx dothis.ksc {Some text Message}
- Frank